package com.apop.oam.admin.user.mapper;

import com.apop.oam.admin.user.model.SysUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author Jiayi Zheng
 * @date 2022/01/07 09:45
 * @Description:
 * @version V1.0
 */
@Mapper
public interface SysUserMapper {

    @Select({"select * from tbl_sys_user where account = #{username}  and password = #{password} limit 1"})
    SysUser getSysUser(@Param("username") String username, @Param("password") String password);

    @Insert({"insert into tbl_sys_user (name,account, password) values (#{username},#{username}, #{password})"})
    int addUserAuth(@Param("username") String username, @Param("password") String password);
}
